$OpenBSD: patch-configure,v 1.19 2014/10/25 11:55:54 chrisz Exp $
--- configure.orig	Fri Oct  3 21:25:46 2014
+++ configure	Sat Oct 18 12:19:58 2014
@@ -822,6 +822,8 @@ case "$target" in
                                 if $arch64;then model=ppc64;else model=ppc;fi;;
   armv6*-*-linux-gnueabihf)     arch=arm; model=armv6; system=linux_eabihf;;
   arm*-*-linux-gnueabihf)       arch=arm; system=linux_eabihf;;
+  arm*-*-openbsd*)              arch=arm; system=bsd;;
+  zaurus*-*-openbsd*)           arch=arm; system=bsd;;
   armv7*-*-linux-gnueabi)       arch=arm; model=armv7; system=linux_eabi;;
   armv6t2*-*-linux-gnueabi)     arch=arm; model=armv6t2; system=linux_eabi;;
   armv6*-*-linux-gnueabi)       arch=arm; model=armv6; system=linux_eabi;;
@@ -1602,11 +1604,11 @@ echo "X11_LINK=$x11_link" >> Makefile
 
 # Look for BFD library
 
-if sh ./hasgot -DPACKAGE=ocaml -i bfd.h && \
-   sh ./hasgot -DPACKAGE=ocaml -lbfd -ldl -liberty -lz bfd_openr; then
+if sh ./hasgot -I${OPENBSD_LOCALBASE}/include -DPACKAGE=ocaml -i bfd.h && \
+   sh ./hasgot -L${OPENBSD_LOCALBASE}/lib -DPACKAGE=ocaml -lbfd -liberty -lz bfd_openr; then
   inf "BFD library found."
   echo "#define HAS_LIBBFD" >> s.h
-  echo "LIBBFD_LINK=-lbfd -ldl -liberty -lz" >> Makefile
+  echo "LIBBFD_LINK=-I${OPENBSD_LOCALBASE}/include -L${OPENBSD_LOCALBASE}/lib -lbfd -liberty -lz" >> Makefile
 else
   wrn "BFD library not found, 'objinfo' will be unable to display info on .cmxs files."
   echo "LIBBFD_LINK=" >> Makefile
